import redis

r = redis.Redis(host="localhost", port="6379", decode_responses=True)

# r.set("key1", "7788", 10)

x = r.get("key1")

print(x)